package my.presentation;

import boundary.ClienteFacade;
import entities.Cliente;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;


@ManagedBean(name="ClienteView")
@RequestScoped
public class ClienteView {
    
    @EJB
    private ClienteFacade clienteFacade;

    // Creates a new field
    private Cliente cliente;


    public ClienteView() {
        this.cliente = new Cliente();
    }

    public Cliente getCliente() {
       return cliente;
    }

    public String postCliente(){
       this.clienteFacade.create(cliente);
       return "theend";
    }
}
